import React, { Component } from 'react';
import { Tabs, Card } from 'antd';
import EvaluateSecondNav from '@/components/EvaluateSecondNav/EvaluateSecondNav';
import CashFlow from './CashFlow';
import PayDebt from './PayDebt';
import Profit from './Profit';
import GrowAbilities from './GrowAbilities';
import OperationCapacity from './OperationCapacity';
import styles from './FinancialAnalysis.less';

const { TabPane } = Tabs;

/**
 * 评价-财务分析
 */
// eslint-disable-next-line react/prefer-stateless-function
export default class FinancialAnalysis extends Component {
  constructor(props) {
    super(props);
    console.log('FinancialAnalysis constructor');
    this.state = {
      // activeKey: localStorage.getItem('dtid') ? localStorage.getItem('dtid') : 0,
    };
  }

  render() {
    console.log('FinancialAnalysis render');
    return (
      <div className="evaluate-wrapper">
        <EvaluateSecondNav />
        <div className={styles.financialAnalysis}>
          <Tabs animated={false} defaultActiveKey="0">
            <TabPane tab="偿债分析" key={0}>
              <PayDebt />
            </TabPane>

            <TabPane tab="盈利分析" key={1}>
              <Profit chartName="盈利分析" />
            </TabPane>

            <TabPane tab="现金流分析" key={2}>
              <CashFlow chartName="现金流分析" />
            </TabPane>

            <TabPane tab="成长分析" key={3}>
              <GrowAbilities chartName="成长分析" />
            </TabPane>
            <TabPane tab="营运分析" key={4}>
              <OperationCapacity chartName="营运分析" />
            </TabPane>
          </Tabs>
        </div>
      </div>
    );
  }
}
